{* load lang file *}
{config_load file="lang`$smarty.const.PLANG`.txt" section="dayView"}

{foreach from=$data item=entry}

	<!-- start entry: {$entry.id} -->
	<div class="entry"> 
      <h3 class="entryTitle">{$entry.subject}</h3>
      {$entry.content|cut:"`$entry.url`":#readon#}

        <p class="posted">
            {$entry.intime|date_format:'%b. %d, %Y'} 
            {if $entry.comments} &mdash; <span class="clink"><a href="{$entry.url}">{#comments#} ({$entry.commentcount})</a></span>{else} &mdash; <a href="{$entry.url}">{#noComments#}</a>{/if}
            {if $entry.keywords}
                <br />
                Posted In:
                {foreach from=$entry.keywords item=keyword name=myKeys}
                    {if not $smarty.foreach.myKeys.last}
                        <a href="{$SERVER_ROOT}keyword/{$keyword.link}/">{$keyword.word}</a>,
                    {else}
                        <a href="{$SERVER_ROOT}keyword/{$keyword.link}/">{$keyword.word}</a>
                    {/if}
                {/foreach}
            {/if}
        </p>

	  <hr class="hide" />
	</div>
	<!-- end entry: {$entry.id} -->

{foreachelse}
	<div class="entry"> 
      <p>{#noJoyExp#}</p>
	</div>
{/foreach}

{if $smarty.const.ENABLE_PAGERS}
	{* figure out next and previous day links *}
	{math equation="x + y" x=$ts y=86400 assign=skipForward}
	{math equation="x - y" x=$ts y=86400 assign=skipBack}
	<div id="skipLinks">
		&larr; <a href="{$SERVER_ROOT}{$skipBack|date_format:"%Y/%m/%d/"}">Previous Day</a> ... <a href="{$SERVER_ROOT}{$skipForward|date_format:"%Y/%m/%d/"}">Next Day</a> &rarr;
	</div>
{/if}
